<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: aquamarine;
            /*过度，width属性两秒逐渐变化*/
            /*all就是所有属性变化*/
            transition: all 2s linear;
        }
        /*鼠标移上去变化*/
        .box:hover{
            width:  300px;
            height: 200px;
        }



        .box2{
            width: 100px;
            height: 100px;
           background-color: blue;
            /*上下左右都隔一个一百*/
            margin: 200px;
            /*两秒  匀速   无限循环*/
            animation: span 2s linear infinite;
        }
         /**/
         @keyframes span{
             /*百分之零 转0度  公转零度 变为本身大小*/
            0%{
                transform: rotate(0deg) translateX(0px)     scale(1);
            }
            50%{
                transform: rotate(180deg) translateX(200px) scale(2);
            }
            100%{
                transform: rotate(360deg) translateX(0px)   scale(1);
            }
         }
    </style>
</head>
<body>
    <div class="box"></div>

    <div class="box2"></div>
</body>
</html>